#include <stdio.h>
#include <stdlib.h>

#include "SDL/SDL.h"

int main(int argc, char *argv[])
{
	SDL_Surface *screen, *logo;
	int i = 0, j;
	char buf[128];
	SDL_Rect logoRect;
	atexit(SDL_Quit);

	if( SDL_Init(SDL_INIT_VIDEO) < 0 ) 
	{
		exit(1);
	}
	logo = SDL_LoadBMP("./sdllogo.bmp");
	SDL_ShowCursor(SDL_DISABLE);

	i = rand()%1024;

	j = rand()%768;
	sprintf(buf, "SDL_VIDEO_WINDOW_POS=%d,%d", i, j);
	SDL_putenv(buf);	
	screen = SDL_SetVideoMode(123,67,16,SDL_HWSURFACE|SDL_DOUBLEBUF);	
		
	SDL_BlitSurface( logo , NULL , screen , &logoRect );
	SDL_Flip(screen);
	while(1)
	{
	}
	return 0;
}
